Open
Conversation
Owner
Author
|
@romgrk I'm struggling a little bit with INOUT arguments. You can see my approach in this PR. I'm trying to encapsule the logic and memory management of IN/OUT args in a Parameter class similar to your approach in |
romgrk
reviewed
Jul 9, 2018
| Local<Array> js_array = Nan::New<Array>(); | ||
| for (int i = 0; i < length; i++) { | ||
| // void** pointer = static_cast<void**>(static_cast<ulong>(native_array) + i * element_size); | ||
| void **pointer = static_cast<void **>(native_array + i * element_size); |
There was a problem hiding this comment.
Awesome if it works for you, but on my side, arithemics on pointers are byte based. E.g. if I add (void*)0x2000 + (int)1, I get (void*)0x2008. That's the reason for casting to a ulong.
|
Do you have more specific questions? I see the general flow of the thing, but I'd need to understand the whole relevant parts of the codebase to spot specific bugs/issues. General observations:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.